<?php
/**
 * @author Martin Pernica
 * @copyright 2008
 */

//ob_start();

session_start();

define('INDEX_LOADED', true);

require_once './config.php';
require_once './libs/Framework/Page.php';

if(!empty($_SESSION['forceLanguage']) && is_file('language/'.$_SESSION['forceLanguage'].'.php')){
	include ('language/' . $_SESSION['forceLanguage'] . '.php');
}else{
	include ('language/' . $GLOBALS['setting']['language'] . '.php');
}

$page = new Page($GLOBALS['setting']['template'], $GLOBALS['setting']['language'], explode('/', $_GET['q']));

$page->output();

//ob_end_flush();
?>